<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<script>
    var num=2e24;
    function chu(num){
        console.time('chu');
        while(!(num % 4)){
            num /= 4;
        }
        console.timeEnd('chu');
        return num === 1;
    }
    chu(num);


    function bit(num){
        console.time('bit');
        while(!(num % 4)){
            num >>>= 2;
        }
        console.timeEnd('bit');
        return num === 1;
    }
    bit(num);


    function reg(num){
        console.time('reg');
        var r=/^1(00)*$/.test(num.toString(2));
        console.timeEnd('reg');
        return r;
    }
    reg(num);

</script>
</body>
</html>